# encoding=utf-8
import sys

reload(sys)
sys.setdefaultencoding('utf-8')
from GeneralService import Login
from Configure import Attribute as att


class historycase(Login.BaseLogin):
    def test_closeHistory(self):
        '''故事--打开故事，关闭故事=====通过状态栏'''
        self.login()
        dr = self.driver
        dr.find_element_by_id(att.bottom_homeStory_id).click()
        dr.find_element_by_name(u"故事").click()
        dr.find_element_by_id(att.homeStory_story_topImg_id).click()
        dr.find_elements_by_id(att.homeStory_story_details_list_id)[0].click()
        dr.press_keycode(4)
        # 开启通知栏
        dr.open_notifications()
        dr.find_element_by_id(att.homeStory_story_notify_close_id).click()
        dr.press_keycode(4)
